#include "processbar.h"
#include <unistd.h>
#include <stdio.h>
void DownLoad()
{
    double total = 1024;
    double speed = 1.0;
    double current = 0;
    while(current <= total)
    {
        //载入进度条 
        ProcessBar(current,total);
        //模拟下载-假设这是一秒
        usleep(1000);
        current += 1;
        
    }
    printf("\nDownLoad :%.2lf MB finish!\n",total);
}


int main()
{
    //ProcessBar();
    DownLoad();
    DownLoad();
    DownLoad();
    return 0;
}
